<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>函数</title>
	<script type="text/javascript">
		var obj = {
			name :"孙悟空",
			age:500,
			gender:"男",
			address:"花果山"
		};

		for(var n in obj){
			document.write("<span>"+"属性名："+n + "</span>");
			document.write("<span>"+"属性值："+ obj[n]+"</span><br />");
		}
	</script>
	<style>
		span{
			display:inline-block;
			width:200px;
		}
	</style>
</head>
<body>
</body>
</html>